package com.pktechan.manage.service.impl;


import com.pktechan.manage.base.BaseMapper;
import com.pktechan.manage.base.BaseServiceImpl;
import com.pktechan.manage.dao.TradeOrderDetailMapper;
import com.pktechan.manage.entity.TradeOrderDetail;
import com.pktechan.manage.service.TradeOrderDetailService;
import com.pktechan.manage.vo.TradeOrderDetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("tradeOrderDetailService")
public class TradeOrderDetailServiceImpl extends BaseServiceImpl<TradeOrderDetail> implements TradeOrderDetailService {

    @Autowired
    private TradeOrderDetailMapper tradeOrderDetailMapper;

    /**
     * 由业务类实现
     *
     * @return
     */
    @Override
    public BaseMapper<TradeOrderDetail> getBaseMapper() {
        return tradeOrderDetailMapper;
    }

    @Override
    public List<TradeOrderDetailVO> getTradeOrderDetailByOrderId(Integer tradeOrderId) {
        return tradeOrderDetailMapper.getTradeOrderDetailByOrderId(tradeOrderId);
    }

    /**
     * 获取订单详情信息
     * @param orderDetailId
     * @return
     */
    @Override
    public TradeOrderDetailVO getTradeOrderDetailById(Integer orderDetailId) {
        return tradeOrderDetailMapper.getTradeOrderDetailById(orderDetailId);
    }
}
